import java.util.*;
public class ProfessorManagement //extends Professor
{
	private int professorCount;
	private int professorMax;
	Professor[] pro;

	public ProfessorManagement()
	{
		professorCount = 0;
		professorMax = 5;
		pro = new Professor[professorMax];	
		
	}

	public void addProfessor(String p_name, String p_gender, int p_birth)
	{
		pro[professorCount] = new Professor(p_name, p_gender, p_birth);
		professorCount++;
	}

	public void updateProfessor(){
	 	Scanner scan= new Scanner(System.in);
		System.out.println("select a number ( ways you want correct)");
		int num = scan.nextInt();
		switch(num){
			case 1: //name
			for (int i = 0; i < professorCount ; i++)
			pro[i].setName(scan.next());
				break;	
			case 2: // gender
			for (int i = 0; i < professorCount ; i++)
			pro[i].setGender(scan.next());
				break;
			
			case 3: // birthday
			for (int i = 0; i < professorCount ; i++)
			pro[i].setBirth(scan.nextInt());
				break;	
		}
	}

	public String toString() {
		String contents = "";
		for (int i=0; i<professorCount ;i++ )
		contents += pro[i].toString() + "\n";
		return contents;
		}

}